package research.ui.editors.tableeditors.strength;

import org.eclipse.jface.viewers.ITableLabelProvider;

import research.domain.StrengthValue;
import research.ui.editors.tableeditors.EntityLabelProvider;

public class StrengthLabelProvider 
	extends EntityLabelProvider
	implements ITableLabelProvider {

	@Override
	public String getColumnText(Object element, int columnIndex) {
		String result = "";
		StrengthValue par = (StrengthValue) element;
		switch (columnIndex) {
			case 0:
				result = render(par.getNumber());
				break;
			case 1:
				result = render(par.getThickness());
				break;
			case 2:
				result = render(par.getPower());
				break;
			case 3:
				result = render(par.getElongation());
				break;
			case 4:
				result = render(StrengthCellModifier.calcStrengthValue(par));
				break;
			default :
				break; 	
		}
		return result;
	}
}
